<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="db.TmppurDAO"%>
<%@page import="db.Tmppur"%>
<%@page import="org.json.JSONObject"%>
<%@ include file="/jsp/common/utility/volti.jsp" %>
<%@ include file="/jsp/common/utility/logined.jsp" %>
<%
	WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
	TmppurDAO tmppurDao = (TmppurDAO)ctx.getBean("TmppurDAO");

	String idPar = request.getParameter("id");
	
	int id = Integer.parseInt(idPar);
	
	Tmppur tmppur = tmppurDao.findById(id);
	tmppur.setState(2);
	tmppurDao.attachDirty(tmppur);
	
	JSONObject json = new JSONObject();
	out.print(json.toString());
%>